<template>
  <div class="date-tpl">
    <h1>{{ msg }}</h1>
    <h2>{{ dateValue }}</h2>
  </div>
</template>

<script>
import moment from 'moment'
export default {
  name: 'DateTpl',
  props: {
    msg: String
  },
  setup () {
    const dateValue = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
    return {
      dateValue
    }
  }
}
</script>

<style scoped lang="scss">
date-tpl{
  margin: 40px;
  color: orangered;
}
</style>
